//
//  HZUserManager.h
//  HZTC_YaDeArt
//
//  Created by MayerF on 17/3/25.
//  Copyright © 2017年 HZTC. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HZPeiziWindow.h"

@interface HZUserManager : NSObject
@property (nonatomic, strong)UITabBarController *tabBarVC;
@property (nonatomic, strong)UIViewController   *clickedRootVC;
@property (nonatomic, copy)NSString *nickName; //昵称
@property (nonatomic, assign)BOOL isLogined; //是否登陆
@property (nonatomic, assign)BOOL isDownLoadStock;//是否已下载自选股
@property (nonatomic, assign)BOOL isKeyboardShow;//键盘是否显示
@property (nonatomic, assign)BOOL isVip;//是否显示配资入口
@property (nonatomic, weak)HZPeiziWindow *peiziWindow;//配资入口
@property (nonatomic, copy)NSString *peiziAccountSession;//当前配资账户session
@property (nonatomic, copy)NSString *session;//当前账户session

@property (nonatomic, assign)BOOL isNormalShow;//是否正常显示app

+ (instancetype)manager;

//获取host
+ (NSString *)getAPIHost;
+ (void)swtichTempIPHost:(NSString *)host;

/* data是系统基本对象类型不能是自定义对象类型 */
+ (void)saveUserDefaultData:(id)data key:(NSString *)key;
+ (void)saveUserDefaultBoolValue:(BOOL)boolValue key:(NSString *)key;
+ (id)getUserDefaultDataWithkey:(NSString *)key;
+ (BOOL)getUserDefaultBoolValueWithkey:(NSString *)key;
+ (void)deleteUserDefaultDataWithKey:(NSString *)key;

+ (BOOL)saveKeyChainData:(id)data key:(NSString *)key;
+ (id)getKeyChainDataWithkey:(NSString *)key;
+ (BOOL)deleteKeyChainDataWithKey:(NSString *)key;

/*定时器*/
- (void)addTimerWithTime:(NSTimeInterval)time
                  repeat:(BOOL)isrepeat
               completed:(void(^)())completed;
- (void)removeTimer;

+ (void)handleCacheAccountAndPwd;
+ (void)logout;
@end
